package org.chen.spring.cloud.finchley.web;

import org.chen.spring.cloud.finchley.service.ConsumerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * @author chensj
 * @date 2020-02-08 14:10
 */
@RestController
public class ProviderController {

  @Autowired
  private ConsumerService consumerService;

  @GetMapping("/getDashboard")
  public List<String> getProviderData() {
    List<String> provider = new ArrayList<String>();
    provider.add("hystrix dashboard");
    return provider;
  }

  @GetMapping("/getHelloService")
  public String getHelloService() {
    return consumerService.getHelloServiceData();
  }
}
